package com.woniu.controller;


import com.woniu.common.CommonResult;
import com.woniu.pojo.CollectService;
import com.woniu.pojo.StopService;
import com.woniu.service.ServiceStopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/stopService")
public class StopServiceController {

    @Autowired
    private ServiceStopService serviceStopService;


    //添加投诉信息
    @PostMapping("/stopservice")
    @ResponseBody
    public CommonResult StopService(StopService stopService)
    {
        try {
           serviceStopService.addStopService(stopService);
        } catch (Exception e) {
            e.printStackTrace();
            return CommonResult.failed("投诉成功");
        }
        return CommonResult.success("投诉成功");
    }


}
